home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2002 January / january_2002.iso / Piposh Special / Piposh / FRITZ1.DXR / 00296_foes4.ls < prev    next >
Encoding:
Text File  |  2004-12-06  |  8.7 KB  |  226 lines

  1. on foes4 myfoe, mycnl
  2.   global ppl, foes, mnv, pwr, psyprop, fxpath
  3.   if (getAt(foes, 1) = myfoe) and (myfoe <> 137) then
  4.     if the locH of sprite getAt(ppl, 1) < (the locH of sprite getAt(ppl, 2) - 120) then
  5.       set the member of sprite mycnl to member(myfoe + 1)
  6.       setAt(foes, 1, 77)
  7.       setAt(mnv, 2, 9)
  8.       sprite(getAt(ppl, 2)).flipH = 0
  9.     else
  10.       if the locH of sprite getAt(ppl, 1) > (the locH of sprite getAt(ppl, 2) + 120) then
  11.         set the member of sprite mycnl to member(myfoe + 1)
  12.         setAt(foes, 1, 77)
  13.         setAt(mnv, 2, 9)
  14.         sprite(getAt(ppl, 2)).flipH = 1
  15.       else
  16.         if abs(the locV of sprite getAt(ppl, 1) - the locV of sprite getAt(ppl, 2)) < 90 then
  17.           set the member of sprite mycnl to member(87)
  18.           setAt(foes, 1, 87)
  19.           setAt(mnv, 2, 6)
  20.           if the locH of sprite getAt(ppl, 1) > the locH of sprite getAt(ppl, 2) then
  21.             sprite(getAt(ppl, 2)).flipH = 1
  22.           else
  23.             sprite(getAt(ppl, 2)).flipH = 0
  24.           end if
  25.           if getAt(pwr, 1) > 0 then
  26.             if psyprop <> 0 then
  27.               set the keyUpScript to "psyreg"
  28.               set the keyDownScript to "psyregb"
  29.               puppetSprite(31, 1)
  30.               set the loc of sprite 31 to the loc of sprite getAt(ppl, 1) - 160
  31.               set the member of sprite 31 to member("hit" & psyprop, 1)
  32.               psyprop = 0
  33.               if random(3) = 1 then
  34.                 sound playFile 2, fxpath & random(3) + 286
  35.               else
  36.                 sound playFile 1, fxpath & "ene1prp.aif"
  37.               end if
  38.               go("stage4")
  39.             end if
  40.             if (the keyCode = 49) and (getAt(mnv, 1) > 1) then
  41.               sound playFile 1, fxpath & "enefis.aif"
  42.             else
  43.               g = random(2)
  44.               if g = 1 then
  45.                 g = 46
  46.               else
  47.                 g = 55
  48.               end if
  49.               set the member of sprite getAt(ppl, 1) to member(g, 2)
  50.               setAt(pwr, 1, getAt(pwr, 1) - 5)
  51.               setAt(mnv, 1, 6)
  52.               sound playFile 1, fxpath & "ene1hit.aif"
  53.               if random(3) = 1 then
  54.                 sound playFile 2, fxpath & random(6) + 268
  55.               else
  56.                 if random(2) = 1 then
  57.                   sound playFile 2, fxpath & random(3) + 286
  58.                 end if
  59.               end if
  60.             end if
  61.           else
  62.             sound playFile 1, fxpath & "ene2dead.aif"
  63.             set the member of sprite getAt(ppl, 1) to member(46, 2)
  64.             setAt(mnv, 1, 6)
  65.             setAt(mnv, 1, 9)
  66.             go("dead")
  67.           end if
  68.         else
  69.           if abs(the locV of sprite getAt(ppl, 1) - the locV of sprite getAt(ppl, 2)) > 90 then
  70.             setAt(foes, 1, 77)
  71.             setAt(mnv, 2, 9)
  72.           end if
  73.         end if
  74.       end if
  75.     end if
  76.   else
  77.     if (getAt(foes, 2) = myfoe) and (myfoe <> 138) then
  78.       if the locH of sprite getAt(ppl, 1) < (the locH of sprite getAt(ppl, 3) - 120) then
  79.         set the member of sprite mycnl to member(myfoe + 1)
  80.         setAt(foes, 2, 104)
  81.         setAt(mnv, 3, 11)
  82.         sprite(getAt(ppl, 3)).flipH = 0
  83.       else
  84.         if the locH of sprite getAt(ppl, 1) > (the locH of sprite getAt(ppl, 3) + 120) then
  85.           set the member of sprite mycnl to member(myfoe + 1)
  86.           setAt(foes, 2, 104)
  87.           setAt(mnv, 3, 11)
  88.           sprite(getAt(ppl, 3)).flipH = 1
  89.         else
  90.           if abs(the locV of sprite getAt(ppl, 1) - the locV of sprite getAt(ppl, 3)) < 90 then
  91.             set the member of sprite mycnl to member(116)
  92.             setAt(foes, 2, 116)
  93.             setAt(mnv, 3, 6)
  94.             if the locH of sprite getAt(ppl, 1) > the locH of sprite getAt(ppl, 3) then
  95.               sprite(getAt(ppl, 3)).flipH = 1
  96.             else
  97.               sprite(getAt(ppl, 3)).flipH = 0
  98.             end if
  99.             if getAt(pwr, 1) > 0 then
  100.               if psyprop <> 0 then
  101.                 set the keyUpScript to "psyreg"
  102.                 set the keyDownScript to "psyregb"
  103.                 puppetSprite(31, 1)
  104.                 set the loc of sprite 31 to the loc of sprite getAt(ppl, 1) - 160
  105.                 set the member of sprite 31 to member("hit" & psyprop, 1)
  106.                 psyprop = 0
  107.                 if random(3) = 1 then
  108.                   sound playFile 2, fxpath & random(3) + 286
  109.                 else
  110.                   sound playFile 1, fxpath & "ene1prp.aif"
  111.                 end if
  112.                 go("stage4")
  113.               end if
  114.               if (the keyCode = 49) and (getAt(mnv, 1) > 1) then
  115.                 sound playFile 1, fxpath & "enefis.aif"
  116.               else
  117.                 g = random(2)
  118.                 if g = 1 then
  119.                   g = 46
  120.                 else
  121.                   g = 55
  122.                 end if
  123.                 set the member of sprite getAt(ppl, 1) to member(g, 2)
  124.                 setAt(pwr, 1, getAt(pwr, 1) - 5)
  125.                 setAt(mnv, 1, 6)
  126.                 sound playFile 1, fxpath & "ene1hit.aif"
  127.                 if random(3) = 1 then
  128.                   sound playFile 2, fxpath & random(6) + 268
  129.                 else
  130.                   if random(2) = 1 then
  131.                     sound playFile 2, fxpath & random(3) + 286
  132.                   end if
  133.                 end if
  134.               end if
  135.             else
  136.               sound playFile 1, fxpath & "ene3dead.aif"
  137.               set the member of sprite getAt(ppl, 1) to member(46, 2)
  138.               setAt(mnv, 1, 6)
  139.               setAt(mnv, 1, 9)
  140.             end if
  141.           else
  142.             if abs(the locV of sprite getAt(ppl, 1) - the locV of sprite getAt(ppl, 3)) > 90 then
  143.               setAt(foes, 2, 104)
  144.               setAt(mnv, 3, 11)
  145.             end if
  146.           end if
  147.         end if
  148.       end if
  149.     else
  150.       if (getAt(foes, 3) = myfoe) and (myfoe <> 294) then
  151.         if the locH of sprite getAt(ppl, 1) < (the locH of sprite getAt(ppl, 4) - 120) then
  152.           set the member of sprite mycnl to member(myfoe + 1)
  153.           setAt(foes, 3, 262)
  154.           setAt(mnv, 4, 10)
  155.           sprite(getAt(ppl, 3)).flipH = 0
  156.         else
  157.           if the locH of sprite getAt(ppl, 1) > (the locH of sprite getAt(ppl, 4) + 120) then
  158.             set the member of sprite mycnl to member(myfoe + 1)
  159.             setAt(foes, 3, 262)
  160.             setAt(mnv, 4, 10)
  161.             sprite(getAt(ppl, 4)).flipH = 1
  162.           else
  163.             if abs(the locV of sprite getAt(ppl, 1) - the locV of sprite getAt(ppl, 4)) < 90 then
  164.               set the member of sprite mycnl to member(271)
  165.               setAt(foes, 3, 271)
  166.               setAt(mnv, 4, 8)
  167.               if the locH of sprite getAt(ppl, 1) > the locH of sprite getAt(ppl, 4) then
  168.                 sprite(getAt(ppl, 4)).flipH = 1
  169.               else
  170.                 sprite(getAt(ppl, 4)).flipH = 0
  171.               end if
  172.               if getAt(pwr, 1) > 0 then
  173.                 if psyprop <> 0 then
  174.                   set the keyUpScript to "psyreg"
  175.                   set the keyDownScript to "psyregb"
  176.                   puppetSprite(31, 1)
  177.                   set the loc of sprite 31 to the loc of sprite getAt(ppl, 1) - 160
  178.                   set the member of sprite 31 to member("hit" & psyprop, 1)
  179.                   psyprop = 0
  180.                   if random(3) = 1 then
  181.                     sound playFile 2, fxpath & random(3) + 286
  182.                   else
  183.                     sound playFile 1, fxpath & "ene1prp.aif"
  184.                   end if
  185.                   go("stage4")
  186.                 end if
  187.                 if (the keyCode = 49) and (getAt(mnv, 1) > 1) then
  188.                   sound playFile 1, fxpath & "enefis.aif"
  189.                 else
  190.                   g = random(2)
  191.                   if g = 1 then
  192.                     g = 46
  193.                   else
  194.                     g = 55
  195.                   end if
  196.                   set the member of sprite getAt(ppl, 1) to member(g, 2)
  197.                   setAt(pwr, 1, getAt(pwr, 1) - 5)
  198.                   setAt(mnv, 1, 6)
  199.                   sound playFile 1, fxpath & "ene1hit.aif"
  200.                   if random(3) = 1 then
  201.                     sound playFile 2, fxpath & random(6) + 268
  202.                   else
  203.                     if random(2) = 1 then
  204.                       sound playFile 2, fxpath & random(3) + 295
  205.                     end if
  206.                   end if
  207.                 end if
  208.               else
  209.                 sound playFile 1, fxpath & "ene3dead.aif"
  210.                 set the member of sprite getAt(ppl, 1) to member(46, 2)
  211.                 setAt(mnv, 1, 6)
  212.                 setAt(mnv, 1, 9)
  213.               end if
  214.             else
  215.               if abs(the locV of sprite getAt(ppl, 1) - the locV of sprite getAt(ppl, 4)) > 90 then
  216.                 setAt(foes, 3, 262)
  217.                 setAt(mnv, 4, 3)
  218.               end if
  219.             end if
  220.           end if
  221.         end if
  222.       end if
  223.     end if
  224.   end if
  225. end
  226.